function PublishAnnouncementCtrl($scope, $state, $http, $stateParams) {
    $scope.submit = function () {
        console.log($stateParams);
        console.log($stateParams.associationUid);
        $http({
            url: 'announcement/add',
            method: 'post',
            params: {
                associationUid: $stateParams.associationUid,
                title: $scope.title,
                description: $scope.description
            },
        }).success(function (response) {
            console.log(response);
            alert('发布通知成功！');
            // $scope.currentPage = response.page + 1;
        })
    }
}

function EditAnnouncementCtrl($scope, $state, $http, $stateParams) {
    $scope.submit = function () {
        console.log($scope.currentPage);
        $http({
            url: 'announcement/edit',
            method: 'post',
            params: {
                announcementUid: $stateParams.announcement.uid,
                title: $scope.title,
                description: $scope.description
            },
        }).success(function (response) {
            alert('修改通知成功！');
            // $scope.currentPage = response.page + 1;
        })
    }
}